package net.proef.sample.service;

import org.dozer.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import net.proef.sample.domain.Address;
import net.proef.sample.xml.XMLAddress;

@Service
public class DozerMappingService implements MappingService {

	@Autowired
	Mapper mapper;

	@Override
	public Address map(XMLAddress address) {
		return mapper.map(address, Address.class);
	}

	@Override
	public XMLAddress map(Address address) {
		return mapper.map(address, XMLAddress.class);
	}
}
